/*
  Copyright (c), 2001-2022, Shenshu Tech. Co., Ltd.
 */

#ifndef HI_COMMON_AIO_H
#define HI_COMMON_AIO_H

#include "hi_common.h"
#include "hi_errno.h"
#include "ot_common_aio.h"

#ifdef __cplusplus
extern "C" {
#endif

#define HI_MAX_AUDIO_FRAME_NUM OT_MAX_AUDIO_FRAME_NUM
#define HI_MAX_AUDIO_POINT_BYTES OT_MAX_AUDIO_POINT_BYTES
#define HI_MAX_VOICE_POINT_NUM OT_MAX_VOICE_POINT_NUM
#define HI_MAX_AUDIO_POINT_NUM OT_MAX_AUDIO_POINT_NUM
#define HI_MAX_AO_POINT_NUM OT_MAX_AO_POINT_NUM
#define HI_MIN_AUDIO_POINT_NUM OT_MIN_AUDIO_POINT_NUM
#define HI_MAX_AI_POINT_NUM OT_MAX_AI_POINT_NUM
#define HI_AUDIO_FRAME_CHN_NUM OT_AUDIO_FRAME_CHN_NUM
#define HI_MAX_AUDIO_FRAME_LEN OT_MAX_AUDIO_FRAME_LEN
#define HI_MAX_AUDIO_STREAM_LEN OT_MAX_AUDIO_STREAM_LEN
#define HI_MAX_AI_USER_FRAME_DEPTH OT_MAX_AI_USER_FRAME_DEPTH
#define HI_MIN_AI_USER_FRAME_DEPTH OT_MIN_AI_USER_FRAME_DEPTH
#define HI_MAX_AUDIO_FILE_PATH_LEN OT_MAX_AUDIO_FILE_PATH_LEN
#define HI_MAX_AUDIO_FILE_NAME_LEN OT_MAX_AUDIO_FILE_NAME_LEN
#define HI_VQE_EQ_BAND_NUM OT_VQE_EQ_BAND_NUM
#define HI_VQE_DRC_SEC_NUM OT_VQE_DRC_SEC_NUM
#define HI_AEC_ERL_BAND_NUM OT_AEC_ERL_BAND_NUM
#define HI_AEC_ERL_BAND_VALUE_NUM OT_AEC_ERL_BAND_VALUE_NUM
#define HI_TALKVQEV2_EQ_BAND_NUM OT_TALKVQEV2_EQ_BAND_NUM
#define HI_AI_TALKVQEV2_MASK_PNR OT_AI_TALKVQEV2_MASK_PNR
#define HI_AI_TALKVQEV2_MASK_NR OT_AI_TALKVQEV2_MASK_NR
#define HI_AI_TALKVQEV2_MASK_EQ OT_AI_TALKVQEV2_MASK_EQ
#define HI_AI_TALKVQEV2_MASK_AGC OT_AI_TALKVQEV2_MASK_AGC
#define HI_AI_TALKVQEV2_MASK_DRC OT_AI_TALKVQEV2_MASK_DRC
#define HI_AI_TALKVQEV2_MASK_LIMITER OT_AI_TALKVQEV2_MASK_LIMITER
#define HI_AI_TALKVQEV2_MASK_DEREVERB OT_AI_TALKVQEV2_MASK_DEREVERB
#define HI_AI_TALKVQEV2_MASK_FMP OT_AI_TALKVQEV2_MASK_FMP
#define HI_AI_TALKVQEV2_MASK_WNR OT_AI_TALKVQEV2_MASK_WNR
#define HI_AI_TALKVQEV2_MASK_AEC OT_AI_TALKVQEV2_MASK_AEC
#define HI_AI_TALKVQEV2_MASK_HS OT_AI_TALKVQEV2_MASK_HS
#define HI_AI_RECORDVQE_MASK_HPF OT_AI_RECORDVQE_MASK_HPF
#define HI_AI_RECORDVQE_MASK_RNR OT_AI_RECORDVQE_MASK_RNR
#define HI_AI_RECORDVQE_MASK_HDR OT_AI_RECORDVQE_MASK_HDR
#define HI_AI_RECORDVQE_MASK_DRC OT_AI_RECORDVQE_MASK_DRC
#define HI_AI_RECORDVQE_MASK_EQ OT_AI_RECORDVQE_MASK_EQ
#define HI_AI_RECORDVQE_MASK_AGC OT_AI_RECORDVQE_MASK_AGC
#define HI_AI_TALKVQE_MASK_HPF OT_AI_TALKVQE_MASK_HPF
#define HI_AI_TALKVQE_MASK_AEC OT_AI_TALKVQE_MASK_AEC
#define HI_AI_TALKVQE_MASK_AGC OT_AI_TALKVQE_MASK_AGC
#define HI_AI_TALKVQE_MASK_EQ OT_AI_TALKVQE_MASK_EQ
#define HI_AI_TALKVQE_MASK_ANR OT_AI_TALKVQE_MASK_ANR
#define HI_AO_VQE_MASK_HPF OT_AO_VQE_MASK_HPF
#define HI_AO_VQE_MASK_ANR OT_AO_VQE_MASK_ANR
#define HI_AO_VQE_MASK_AGC OT_AO_VQE_MASK_AGC
#define HI_AO_VQE_MASK_EQ OT_AO_VQE_MASK_EQ
#define HI_AUDIO_SAMPLE_RATE_8000 OT_AUDIO_SAMPLE_RATE_8000
#define HI_AUDIO_SAMPLE_RATE_12000 OT_AUDIO_SAMPLE_RATE_12000
#define HI_AUDIO_SAMPLE_RATE_11025 OT_AUDIO_SAMPLE_RATE_11025
#define HI_AUDIO_SAMPLE_RATE_16000 OT_AUDIO_SAMPLE_RATE_16000
#define HI_AUDIO_SAMPLE_RATE_22050 OT_AUDIO_SAMPLE_RATE_22050
#define HI_AUDIO_SAMPLE_RATE_24000 OT_AUDIO_SAMPLE_RATE_24000
#define HI_AUDIO_SAMPLE_RATE_32000 OT_AUDIO_SAMPLE_RATE_32000
#define HI_AUDIO_SAMPLE_RATE_44100 OT_AUDIO_SAMPLE_RATE_44100
#define HI_AUDIO_SAMPLE_RATE_48000 OT_AUDIO_SAMPLE_RATE_48000
#define HI_AUDIO_SAMPLE_RATE_64000 OT_AUDIO_SAMPLE_RATE_64000
#define HI_AUDIO_SAMPLE_RATE_96000 OT_AUDIO_SAMPLE_RATE_96000
#define HI_AUDIO_SAMPLE_RATE_BUTT OT_AUDIO_SAMPLE_RATE_BUTT
typedef ot_audio_sample_rate hi_audio_sample_rate;
#define HI_AUDIO_BIT_WIDTH_8 OT_AUDIO_BIT_WIDTH_8
#define HI_AUDIO_BIT_WIDTH_16 OT_AUDIO_BIT_WIDTH_16
#define HI_AUDIO_BIT_WIDTH_24 OT_AUDIO_BIT_WIDTH_24
#define HI_AUDIO_BIT_WIDTH_BUTT OT_AUDIO_BIT_WIDTH_BUTT
typedef ot_audio_bit_width hi_audio_bit_width;
#define HI_AIO_MODE_I2S_MASTER OT_AIO_MODE_I2S_MASTER
#define HI_AIO_MODE_I2S_SLAVE OT_AIO_MODE_I2S_SLAVE
#define HI_AIO_MODE_PCM_SLAVE_STD OT_AIO_MODE_PCM_SLAVE_STD
#define HI_AIO_MODE_PCM_SLAVE_NON_STD OT_AIO_MODE_PCM_SLAVE_NON_STD
#define HI_AIO_MODE_PCM_MASTER_STD OT_AIO_MODE_PCM_MASTER_STD
#define HI_AIO_MODE_PCM_MASTER_NON_STD OT_AIO_MODE_PCM_MASTER_NON_STD
#define HI_AIO_MODE_BUTT OT_AIO_MODE_BUTT
typedef ot_aio_mode hi_aio_mode;
#define HI_AIO_I2STYPE_INNERCODEC OT_AIO_I2STYPE_INNERCODEC
#define HI_AIO_I2STYPE_INNERHDMI OT_AIO_I2STYPE_INNERHDMI
#define HI_AIO_I2STYPE_EXTERN OT_AIO_I2STYPE_EXTERN
#define HI_AIO_I2STYPE_DMIC OT_AIO_I2STYPE_DMIC
typedef ot_aio_i2s_type hi_aio_i2s_type;
#define HI_AUDIO_SOUND_MODE_MONO OT_AUDIO_SOUND_MODE_MONO
#define HI_AUDIO_SOUND_MODE_STEREO OT_AUDIO_SOUND_MODE_STEREO
#define HI_AUDIO_SOUND_MODE_BUTT OT_AUDIO_SOUND_MODE_BUTT
typedef ot_audio_snd_mode hi_audio_snd_mode;
#define HI_G726_16K OT_G726_16K
#define HI_G726_24K OT_G726_24K
#define HI_G726_32K OT_G726_32K
#define HI_G726_40K OT_G726_40K
#define HI_MEDIA_G726_16K OT_MEDIA_G726_16K
#define HI_MEDIA_G726_24K OT_MEDIA_G726_24K
#define HI_MEDIA_G726_32K OT_MEDIA_G726_32K
#define HI_MEDIA_G726_40K OT_MEDIA_G726_40K
#define HI_G726_BUTT OT_G726_BUTT
typedef ot_g726_bps hi_g726_bps;
#define HI_ADPCM_TYPE_DVI4 OT_ADPCM_TYPE_DVI4
#define HI_ADPCM_TYPE_IMA OT_ADPCM_TYPE_IMA
#define HI_ADPCM_TYPE_ORG_DVI4 OT_ADPCM_TYPE_ORG_DVI4
#define HI_ADPCM_TYPE_BUTT OT_ADPCM_TYPE_BUTT
typedef ot_adpcm_type hi_adpcm_type;
#define HI_AI_EXPAND OT_AI_EXPAND
#define HI_AI_CUT OT_AI_CUT
typedef ot_aio_attr hi_aio_attr;
typedef ot_ai_chn_param hi_ai_chn_param;
#define HI_AI_CHN_MODE_NORMAL OT_AI_CHN_MODE_NORMAL
#define HI_AI_CHN_MODE_FAST OT_AI_CHN_MODE_FAST
#define HI_AI_CHN_MODE_BUTT OT_AI_CHN_MODE_BUTT
typedef ot_ai_chn_mode hi_ai_chn_mode;
typedef ot_ai_chn_attr hi_ai_chn_attr;
typedef ot_audio_frame hi_audio_frame;
typedef ot_aec_frame hi_aec_frame;
typedef ot_audio_frame_info hi_audio_frame_info;
typedef ot_audio_stream hi_audio_stream;
typedef ot_ao_chn_state hi_ao_chn_state;
#define HI_AUDIO_TRACK_NORMAL OT_AUDIO_TRACK_NORMAL
#define HI_AUDIO_TRACK_BOTH_LEFT OT_AUDIO_TRACK_BOTH_LEFT
#define HI_AUDIO_TRACK_BOTH_RIGHT OT_AUDIO_TRACK_BOTH_RIGHT
#define HI_AUDIO_TRACK_EXCHANGE OT_AUDIO_TRACK_EXCHANGE
#define HI_AUDIO_TRACK_MIX OT_AUDIO_TRACK_MIX
#define HI_AUDIO_TRACK_LEFT_MUTE OT_AUDIO_TRACK_LEFT_MUTE
#define HI_AUDIO_TRACK_RIGHT_MUTE OT_AUDIO_TRACK_RIGHT_MUTE
#define HI_AUDIO_TRACK_BOTH_MUTE OT_AUDIO_TRACK_BOTH_MUTE
#define HI_AUDIO_TRACK_BUTT OT_AUDIO_TRACK_BUTT
typedef ot_audio_track_mode hi_audio_track_mode;
#define HI_AUDIO_FADE_RATE_1 OT_AUDIO_FADE_RATE_1
#define HI_AUDIO_FADE_RATE_2 OT_AUDIO_FADE_RATE_2
#define HI_AUDIO_FADE_RATE_4 OT_AUDIO_FADE_RATE_4
#define HI_AUDIO_FADE_RATE_8 OT_AUDIO_FADE_RATE_8
#define HI_AUDIO_FADE_RATE_16 OT_AUDIO_FADE_RATE_16
#define HI_AUDIO_FADE_RATE_32 OT_AUDIO_FADE_RATE_32
#define HI_AUDIO_FADE_RATE_64 OT_AUDIO_FADE_RATE_64
#define HI_AUDIO_FADE_RATE_128 OT_AUDIO_FADE_RATE_128
#define HI_AUDIO_FADE_RATE_BUTT OT_AUDIO_FADE_RATE_BUTT
typedef ot_audio_fade_rate hi_audio_fade_rate;
typedef ot_audio_fade hi_audio_fade;
typedef ot_ai_aec_cfg hi_ai_aec_cfg;
typedef ot_audio_anr_cfg hi_audio_anr_cfg;
typedef ot_audio_agc_cfg hi_audio_agc_cfg;
#define HI_AUDIO_HPF_FREQ_80 OT_AUDIO_HPF_FREQ_80
#define HI_AUDIO_HPF_FREQ_120 OT_AUDIO_HPF_FREQ_120
#define HI_AUDIO_HPF_FREQ_150 OT_AUDIO_HPF_FREQ_150
#define HI_AUDIO_HPF_FREQ_BUTT OT_AUDIO_HPF_FREQ_BUTT
typedef ot_audio_hpf_freq hi_audio_hpf_freq;
typedef ot_audio_hpf_cfg hi_audio_hpf_cfg;
typedef ot_ai_rnr_cfg hi_ai_rnr_cfg;
typedef ot_audio_eq_cfg hi_audio_eq_cfg;
#define HI_VQE_WORK_STATE_COMMON OT_VQE_WORK_STATE_COMMON
#define HI_VQE_WORK_STATE_MUSIC OT_VQE_WORK_STATE_MUSIC
#define HI_VQE_WORK_STATE_NOISY OT_VQE_WORK_STATE_NOISY
typedef ot_vqe_work_state hi_vqe_work_state;
#define HI_VQE_RECORD_NORMAL OT_VQE_RECORD_NORMAL
#define HI_VQE_RECORD_BUTT OT_VQE_RECORD_BUTT
typedef ot_vqe_record_type hi_vqe_record_type;
typedef ot_ai_hdr_cfg hi_ai_hdr_cfg;
typedef ot_ai_drc_cfg hi_ai_drc_cfg;
typedef ot_ai_talk_v2_eq_cfg hi_ai_talk_v2_eq_cfg;
typedef ot_ai_talk_v2_pnr_cfg hi_ai_talk_v2_pnr_cfg;
typedef ot_ai_talk_v2_nr_cfg hi_ai_talk_v2_nr_cfg;
typedef ot_ai_talk_v2_agc_cfg hi_ai_talk_v2_agc_cfg;
typedef ot_ai_talk_v2_aec_cfg hi_ai_talk_v2_aec_cfg;
typedef ot_ai_talk_v2_wnr_cfg hi_ai_talk_v2_wnr_cfg;
typedef ot_ai_talk_v2_fmp_cfg hi_ai_talk_v2_fmp_cfg;
typedef ot_ai_talk_v2_hs_cfg hi_ai_talk_v2_hs_cfg;
typedef ot_ai_talk_vqe_v2_cfg hi_ai_talk_vqe_v2_cfg;
typedef ot_ai_record_vqe_cfg hi_ai_record_vqe_cfg;
typedef ot_ai_talk_vqe_cfg hi_ai_talk_vqe_cfg;
typedef ot_ao_vqe_cfg hi_ao_vqe_cfg;
typedef ot_vqe_mod_cfg hi_vqe_mod_cfg;
typedef ot_audio_vqe_register hi_audio_vqe_register;
typedef ot_audio_save_file_info hi_audio_save_file_info;
typedef ot_audio_file_status hi_audio_file_status;
#define HI_AUDIO_CLK_SELECT_BASE OT_AUDIO_CLK_SELECT_BASE
#define HI_AUDIO_CLK_SELECT_SPARE OT_AUDIO_CLK_SELECT_SPARE
#define HI_AUDIO_CLK_SELECT_BUTT OT_AUDIO_CLK_SELECT_BUTT
typedef ot_audio_clk_select hi_audio_clk_select;
typedef ot_audio_mod_param hi_audio_mod_param;
#define HI_AIO_ERR_VQE_ERR OT_AIO_ERR_VQE_ERR
typedef ot_aio_err_code hi_aio_err_code;
#define HI_ERR_AIO_ILLEGAL_PARAM OT_ERR_AIO_ILLEGAL_PARAM
#define HI_ERR_AIO_NULL_PTR OT_ERR_AIO_NULL_PTR
#define HI_ERR_AIO_NOT_PERM OT_ERR_AIO_NOT_PERM
#define HI_ERR_AIO_NOT_READY OT_ERR_AIO_NOT_READY
#define HI_ERR_AIO_BUSY OT_ERR_AIO_BUSY
#define HI_ERR_AIO_REGISTER_ERR OT_ERR_AIO_REGISTER_ERR
#define HI_ERR_AI_INVALID_DEV_ID OT_ERR_AI_INVALID_DEV_ID
#define HI_ERR_AI_INVALID_CHN_ID OT_ERR_AI_INVALID_CHN_ID
#define HI_ERR_AI_ILLEGAL_PARAM OT_ERR_AI_ILLEGAL_PARAM
#define HI_ERR_AI_NULL_PTR OT_ERR_AI_NULL_PTR
#define HI_ERR_AI_NOT_CFG OT_ERR_AI_NOT_CFG
#define HI_ERR_AI_NOT_SUPPORT OT_ERR_AI_NOT_SUPPORT
#define HI_ERR_AI_NOT_PERM OT_ERR_AI_NOT_PERM
#define HI_ERR_AI_NOT_ENABLED OT_ERR_AI_NOT_ENABLED
#define HI_ERR_AI_NO_MEM OT_ERR_AI_NO_MEM
#define HI_ERR_AI_NO_BUF OT_ERR_AI_NO_BUF
#define HI_ERR_AI_BUF_EMPTY OT_ERR_AI_BUF_EMPTY
#define HI_ERR_AI_BUF_FULL OT_ERR_AI_BUF_FULL
#define HI_ERR_AI_NOT_READY OT_ERR_AI_NOT_READY
#define HI_ERR_AI_BUSY OT_ERR_AI_BUSY
#define HI_ERR_AI_VQE_ERR OT_ERR_AI_VQE_ERR
#define HI_ERR_AO_INVALID_DEV_ID OT_ERR_AO_INVALID_DEV_ID
#define HI_ERR_AO_INVALID_CHN_ID OT_ERR_AO_INVALID_CHN_ID
#define HI_ERR_AO_ILLEGAL_PARAM OT_ERR_AO_ILLEGAL_PARAM
#define HI_ERR_AO_NULL_PTR OT_ERR_AO_NULL_PTR
#define HI_ERR_AO_NOT_CFG OT_ERR_AO_NOT_CFG
#define HI_ERR_AO_NOT_SUPPORT OT_ERR_AO_NOT_SUPPORT
#define HI_ERR_AO_NOT_PERM OT_ERR_AO_NOT_PERM
#define HI_ERR_AO_NOT_ENABLED OT_ERR_AO_NOT_ENABLED
#define HI_ERR_AO_NO_MEM OT_ERR_AO_NO_MEM
#define HI_ERR_AO_NO_BUF OT_ERR_AO_NO_BUF
#define HI_ERR_AO_BUF_EMPTY OT_ERR_AO_BUF_EMPTY
#define HI_ERR_AO_BUF_FULL OT_ERR_AO_BUF_FULL
#define HI_ERR_AO_NOT_READY OT_ERR_AO_NOT_READY
#define HI_ERR_AO_BUSY OT_ERR_AO_BUSY
#define HI_ERR_AO_VQE_ERR OT_ERR_AO_VQE_ERR

#ifdef __cplusplus
}
#endif
#endif /* HI_COMMON_AIO_H */
